package com.sxzt.core.result;

import cn.hutool.json.JSONUtil;
import com.sxzt.core.enum_status.DefaultBusinessStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class DefaultResponseUtil<T> extends AbstractResponseUtil<T> {

    @Override
    public DefaultResult<T> get() {
        return new ResponseUtil<>();
    }


    public static void main(String[] args) {
        System.out.println(new ResponseUtil<String>().ok("1", "2"));
        System.out.println(new ResponseUtil<String>().lift(DefaultBusinessStatus.ERROR, "2"));
        System.out.println(JSONUtil.toJsonStr(new ResponseUtil<String>().ok("2", "www.baidu.com")));
    }
}



